Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is-docker

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-docker

Check if the process is running inside a Docker container

  • 2.2.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.2M
decreased by-80.29%
Maintainers
1
Weekly downloads
 
Created

What is is-docker?

The is-docker npm package is a simple utility that allows you to check if your code is running inside a Docker container. This can be particularly useful for altering behavior, debugging, or applying configurations specific to Docker environments.

What are is-docker's main functionalities?

Check if running in Docker

This feature allows you to determine if your application is running inside a Docker container. The `isDocker()` function returns a boolean value: `true` if the environment is detected as a Docker container, and `false` otherwise. This can be useful for adjusting configurations or behavior when running in Docker.

const isDocker = require('is-docker');

if (isDocker()) {
  console.log('Running inside a Docker container!');
} else {
  console.log('Running outside of Docker.');
}

Other packages similar to is-docker

Keywords

FAQs

Package last updated on 09 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc